home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
text
/
tex
/
tpp410n.lha
/
TPPGlobal.lha
/
rexx
/
tpl
/
StartDVIPrint.tpl
< prev
next >
Wrap
Text File
|
1993-01-17
|
2KB
|
69 lines
/* Start DVIPrint - Macro */
/* Kick 2.0 only */
options results
binary='TeX:bin/DVIPrint'
output='>"CON:0/16/700/440/DVIPrint Ausgabe Fenster/AUTO/WAIT/ALT/INACTIVE/SCREENTextPlus"'
hailstring='DVIPrint Optionen'
wbtofront='TeX:bin/ptofront'
dviopts='-f 1 -t 100 -h 2.20cm -v 0.00cm -p '
address 'TextPlus'
/* get name of current file */
'GetName'
filename = result
/* strip off extension */
if RIGHT(filename, 4) == '.tex' then do
len = LENGTH(filename) - 4
filename = LEFT(filename, len)
end
printopts = dviopts filename
'RequestString' hailstring'\\'printopts
printopts = result
n = WORDS(printopts)
fullname = WORD(printopts, n)
n = LENGTH(printopts) - LENGTH(fullname)
printopts = LEFT(printopts, n)
PARSE VALUE namestruc(fullname) WITH ivol idirs ibase .
IF fullname == "" then empty = 'true'
else empty = 'false'
IF "" == SUBSTR(fullname, 1+ivol+idirs+ibase) THEN DO
fullname = fullname||".dvi" /* supply a default extension */
ibase = ibase + 4
END
IF 0 = ivol THEN DO
direc = PRAGMA('d')
IF RIGHT(direc,1)~='/' & RIGHT(direc,1)~=':' THEN direc=direc||'/'
fullname = direc||fullname
DROP direc
END
ELSE DO
direc = SUBSTR(fullname, 1, ivol+idirs)
IF RIGHT(direc,1) = '/' THEN DO
n = LENGTH(direc)
direc = LEFT(direc, n-1)
END
call pragma 'Directory', direc
END
DROP ivol idirs ibase
/* valid filename/opts ? */
if empty = 'false' then do
/* address command wbtofront 'Workbench'*/
address command binary output printopts fullname
end
else
'Display' 'DVIPrint --- Abbruch'